/**
 *表单登录和注册规则
 * */
export const rules = {
  mobile: [
    { required: true, message: '手机号不能为空' },
    { pattern: /^1[3-9]\d{9}$/, message: '手机号格式不正确' },
  ],
  password: [
    { required: true, message: '密码不能为空' },
    { pattern: /^\w{8,24}$/, message: '密码需8-24个字符' },
  ],
  code: [
    { required: true, message: '请输入验证码' },
    { pattern: /^\d{6}$/, message: '验证码需6位数' },
  ],
};